﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyAlbum.Model;
using MyAlbum.Data;
using MyAlbum.Utility;

namespace MyAlbum.Services
{
    public class EntranceService : IDataService<Entrance>
    {
        private IRepository<Entrance> _repository;
        public EntranceService(IRepository<Entrance> entranceRepository)
        {
            if (entranceRepository == null)
            {
                throw new ArgumentNullException("entranceRepository");
            }
            this._repository = entranceRepository;
        }
        #region IDataService<Entrance> Members

        public List<Entrance> GetItems()
        {
           return this._repository.GetItems();
        }


        public void DeleteItem(Entrance item)
        {
            this._repository.DeleteItem(item);
        }

        public void UpdateItem(Entrance item, IValidationSummary validationSummary)
        {
            throw new NotImplementedException();
        }

      
        public Entrance GetItemById(string id)
        {
            return this._repository.GetItemById(id);
        }

      


        public void AddItem(Entrance item, MyAlbum.Utility.IValidationSummary summary)
        {
            this._repository.AddItem(item);
        }

        #endregion
    }
}
